home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 44
/
Aminet 44 (2001)(GTI - Schatztruhe)[!][Aug 2001].iso
/
Aminet
/
dev
/
gui
/
gtlayout.lha
/
Source
/
LT_DisposeMenu.c
< prev
next >
Wrap
C/C++ Source or Header
|
1999-01-02
|
2KB
|
74 lines
/*
** GadTools layout toolkit
**
** Copyright © 1993-1999 by Olaf `Olsen' Barthel
** Freely distributable.
**
** :ts=4
*/
#ifndef _GTLAYOUT_GLOBAL_H
#include "gtlayout_global.h"
#endif
/*****************************************************************************/
#include <stddef.h>
/*****************************************************************************/
#include "Assert.h"
/*****************************************************************************/
#ifdef DO_MENUS /* Support code */
/****** gtlayout.library/LT_DisposeMenu ******************************************
*
* NAME
* LT_DisposeMenu -- Release storage space allocated by
* LT_NewMenuTemplate or LT_NewMenuTagList (V11)
*
* SYNOPSIS
* LT_DisposeMenu(Menu)
* A0
*
* VOID LT_DisposeMenu(struct Menu *);
*
* FUNCTION
* Menus and MenuItems allocated by LT_NewMenuTemplate or
* LT_NewMenuTagList are deallocated.
*
* INPUTS
* Menu - Pointer to Menu structure as returned by
* LT_NewMenuTemplate or LT_NewMenuTagList. Passing
* NULL is harmless.
*
* RESULT
* none
*
* SEE ALSO
* gtlayout.library/LT_NewMenuTagList
* gtlayout.library/LT_NewMenuTemplate
*
******************************************************************************
*
*/
VOID LIBENT
LT_DisposeMenu(REG(a0) struct Menu *Menu)
{
if(Menu)
{
struct RootMenu *Root = (struct RootMenu *)((ULONG)Menu - offsetof(struct RootMenu,Menu));
FreeScreenDrawInfo(Root->Screen,Root->DrawInfo);
CloseFont(Root->Font);
AsmDeletePool(Root->Pool,SysBase);
}
}
#endif /* DO_MENUS */